Repository navigation
test(id): review-gated chat-frame PoC harness on /id-envelope/1 (#2808) - #3887
Conversation
Test-only two-endpoint harness (envelope_net tests): a CaptureFrames receiver on the existing ENVELOPE_ALPN exchanges the proposed v1 chat frame byte-for-byte in both directions and resolves a linked blob from the recipients local store with BLAKE3 hash verification. It deliberately does NOT use the production EnvelopeProtocol (which parses directory envelopes and refuses chat-frame JSON) or the CLI (which has no arbitrary-frame command) — that harness-vs-CLI gap is the review question on #2808. Frame sig field is a test-only placeholder; no signature verification is claimed. Harness authored across queue task 5792 attempts (openchamber lane + lane B compile fixes: Debug derive for CaptureFrames, Hash::new for content hashing).
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 51 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f8f4356c17
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| /// hit; it does not test CLI routing, production envelope acceptance, or | ||
| /// chat signature verification. | ||
| #[tokio::test] | ||
| async fn review_gated_chat_frame_round_trips_and_resolves_local_blob() { |
There was a problem hiding this comment.
Prefix the new test name with
test_
The new test omits the test_ prefix explicitly required by the Naming guideline in pkgs/id/AGENTS.md. Rename it to test_review_gated_chat_frame_round_trips_and_resolves_local_blob to comply with the repository's documented test-naming convention.
AGENTS.md reference: pkgs/id/AGENTS.md:L140-L140
Useful? React with 👍 / 👎.
| use iroh_blobs::{Hash, store::mem::MemStore}; | ||
| use std::sync::Arc; |
There was a problem hiding this comment.
Place the new imports in the required groups
The newly added external iroh_blobs import and standard-library Arc import appear after internal crate:: imports. The Imports guideline in pkgs/id/AGENTS.md explicitly requires standard-library imports first, alphabetical external crates second, and internal imports last, with blank lines separating those groups. Place these additions in their prescribed groups rather than extending the existing noncompliant layout.
AGENTS.md reference: pkgs/id/AGENTS.md:L138-L138
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 3b78696: test-module imports regrouped per pkgs/id/AGENTS.md — std first (Arc, Instant), external crates second (iroh, iroh_blobs, tokio), internal (super::*, crate::) last, blank-line separated. — queue worker lane D (task 5794 gate review).
…3941) * feat(id): chat.message.v1 message shape + causal projection (#3799) First slice of the ID chat v1 core, gated until now on the #2808 PoC sign-off (recorded 2026-11-01, PR #3887 merged): the versioned chat.message.v1 body in the documents.rs pattern — bounded sanitized text (world-chat 2048-byte rule), blob/event links only, hash-verified blob retrieval, holder-set link API — plus a projection that folds delivered events into the channel timeline by their causal after links, deduping duplicate delivery and never letting arrival order define causal order. Author is the event signing key, never the transport peer. Membership/history enforcement stays with the group policy + store read path, named as the seam in the module docs. * feat(id): chat projection follows header backlinks too (#3799) Codex P2 on PR #3941: a same-author chain names its causal parent only in header.backlink (local_events::other_heads keeps the author own head out of extensions.after), so an after-only projection could display a later same-author message first. ChatRecord now carries the backlink and project() treats it as a causal parent; regression test added.
Review-gated PoC for #2808 — test-only harness, NOT a chat feature.
Adds one test in
pkgs/id/src/envelope_net.rs(review_gated_chat_frame_round_trips_and_resolves_local_blob): two loopback endpoints exchange the proposed v1 chat frame over the existing/id-envelope/1ALPN in both directions, byte-for-byte, and the recipient resolves a linked blob from its local store with BLAKE3 hash verification.Verified on the laptop at this branch's base (
ec305bf00):cargo test --lib envelope_net::tests::review_gated_chat_frame_round_trips_and_resolves_local_blob— 1 passed. Full transcript (exact frame bytes both directions + resolution line) is posted on #2808.The gap this PR exists to surface: the exchange uses a test-only
CaptureFramesreceiver, because the productionEnvelopeProtocolparses bodies asdirectory::Envelopeand refuses chat-frame JSON, and the CLI has no arbitrary-frame command. So the issue's "two CLI nodes" acceptance is not met by this harness — the transport shape is proven, the product surface is not. Thesigfield is a placeholder; no signature verification is claimed or tested.Ask: orchestrator/Drew sign-off on the harness-vs-CLI gap — accept the transport proof as the PoC result, or scope a follow-up that teaches a real surface (CLI command or protocol branch) to carry chat frames — before any permanent implementation is built on this.
Branch is behind current main; the test is verified at its base and touches only test code in one file.
Need help on this PR? Tag
@codesmith-botwith what you need.